﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<brjostagjof.Models.RegisterSpecialistModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Skrá fagaðila
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Skrá fagaðila</h2>
    <p>
        Fylltu út í formið til að stofna nýjan aðgang fyrir fagaðila.
    </p>
    <p>
        Lykilorð verða að vera að minnsta kosti <%: ViewData["PasswordLength"] %> stafir að lengd.
    </p>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            
            <div class="editor-label">
                Notendanafn:
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.UserName) %>
                <%: Html.ValidationMessageFor(model => model.UserName) %>
            </div>
            
            <div class="editor-label">
                Netfang:
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Email) %>
                <%: Html.ValidationMessageFor(model => model.Email) %>
            </div>
            
            <div class="editor-label">
                Lykilorð:
            </div>
            <div class="editor-field">
                <%: Html.PasswordFor(model => model.Password) %>
                <%: Html.ValidationMessageFor(model => model.Password) %>
            </div>
            
            <div class="editor-label">
                Staðfesta lykilorð:
            </div>
            <div class="editor-field">
                <%: Html.PasswordFor(model => model.ConfirmPassword) %>
                <%: Html.ValidationMessageFor(model => model.ConfirmPassword) %>
            </div>
            
            <div class="editor-label">
                Fullt nafn:
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FullName) %>
                <%: Html.ValidationMessageFor(model => model.FullName) %>
            </div>
            
            <div class="editor-label">
                Flokkur:
            </div>
            <div class="editor-field">
                <select name="Category" id="Category">
                    <% foreach (var item in brjostagjof.Controllers.HomeController.GetSpecialistCategories())
                       { %>
                       <option value="<%: item.ID %>"><%: item.name %></option>
                       <% } %>
                </select>
                <%: Html.ValidationMessageFor(model => model.Category) %>
            </div>
            
            <div class="editor-label">
                Heimilisfang:
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Address) %>
                <%: Html.ValidationMessageFor(model => model.Address) %>
            </div>
            
            <div class="editor-label">
                Póstfang:
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.zip) %>
                <%: Html.ValidationMessageFor(model => model.zip) %>
            </div>
            
            <div class="editor-label">
                Aldur:
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Age) %>
                <%: Html.ValidationMessageFor(model => model.Age) %>
            </div>
            
            <div class="editor-label">
                Kyn:
            </div>
            <div class="editor-field">
                <p>KK: <input type="radio" value="true" name="Gender" /></p>
                <p>KVK: <input type="radio" value="false" name="Gender" /></p>
                <%: Html.ValidationMessageFor(model => model.Gender) %>
            </div>
            
            <div class="editor-label">
                Um mig:
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.Description) %>
                <%: Html.ValidationMessageFor(model => model.Description) %>
            </div>
            
            <p>
                <input type="submit" value="Búa til" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Hætta við", "Index") %>
    </div>

</asp:Content>

